#ifndef _cesium_platform_hpp_
#define _cesium_platform_hpp_

#include <cstdlib>
#include <cassert>
#include <cstring>

#define CESIUM_WINDOWS   0
#define CESIUM_LINUX     1
#define CESIUM_APPLE     2


#if defined(__WIN32__) || defined(_WIN32)
#define CESIUM_PLATFORM CESIUM_WINDOWS
#elif defined(__APPLE_CC__) || defined(__APPLE__)
#define CESIUM_PLATFORM CESIUM_APPLE
#else
#define CESIUM_PLATFORM CESIUM_LINUX
#endif


#ifndef CESIUM_EXPORT
# if CESIUM_PLATFORM == CESIUM_WINDOWS
#   if defined(STATIC_LINKED)
#     define CESIUM_EXPORT
#   else
#     if defined(CESIUM_BUILD)
#       define CESIUM_EXPORT __declspec(dllexport)
#     else
#       define CESIUM_EXPORT __declspec(dllimport)
#     endif
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASVISIBILITY)
#     define CESIUM_EXPORT __attribute__ ((visibility("default")))
#   else
#     define CESIUM_EXPORT
#   endif
# endif
#endif


namespace Cesium {

// numeric typedefs to get standardized types
#if CESIUM_PLATFORM == CESIUM_WINDOWS
typedef __int8 int8;
typedef unsigned __int8 uint8;
typedef __int16 int16;
typedef unsigned __int16 uint16;
typedef __int32 int32;
typedef unsigned __int32 uint32;
typedef __int64 int64;
typedef unsigned __int64 uint64;
#else
#include <stdint.h>
typedef int8_t int8;
typedef uint8_t uint8;
typedef int16_t int16;
typedef uint16_t uint16;
typedef int32_t int32;
typedef uint32_t uint32;
typedef int64_t int64;
typedef uint64_t uint64;
#endif
typedef float float32;
typedef double float64;

typedef uint8 byte;

} // namespace Cesium

#endif //_cesium_platform_hpp_
